package com.smartfast4j.sys.service.impl;

import com.smartfast4j.sys.entity.User;
import com.smartfast4j.sys.mapper.UserMapper;
import com.smartfast4j.sys.service.IUserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 系统用户表 服务实现类
 * </p>
 *
 * @author 孤傲苍狼
 * @since 2017-08-28
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

  /*  @Autowired
    private UserMapper userMapper;

     @Override
    public User getUserByName(String name) {
        return userMapper.getUserByName(name);
    }

    */

    @Override
    public User getUserByName(String name) {
        return baseMapper.getUserByName(name);
    }

    @Override
    public User selectByPrimaryKey(Long id) {
        return baseMapper.selectByPrimaryKey(id);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return baseMapper.deleteByPrimaryKey(id);
    }
}
